package com.pkx.cloud.fse7.dms.dmstoken.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pkx.cloud.fse7.dms.dmstoken.entity.DmsToken;
import com.pkx.cloud.fse7.dms.dmstoken.service.DmsTokenService;
import com.pkx.cloud.whzx.comn.ORpose;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

/**
 *  控制器
 *
 * @author zhangwh
 * @since 2020-10-15
 */
@RestController
@RequestMapping("/dmstoken/dms-token")
@Api(value = "门禁授权信息", tags = "门禁授权信息")
@Slf4j
@ORpose
public class DmsTokenController {

    @Autowired
    private DmsTokenService dmsTokenService;

    @ApiOperation("门禁授权信息分页列表")
    @GetMapping("/page")
    public Page<DmsToken> page(Page page, DmsToken dmsToken) {
        return dmsTokenService.pageList(page,dmsToken);
    }

    @ApiOperation("门禁授权信息列表")
    @GetMapping("/list")
    public List<DmsToken> list(DmsToken dmsToken) {
        return dmsTokenService.listByEntity(dmsToken);
    }

}
